﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="PhuongDoAn.Admin.Default" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Đồ án môn học</title>
    <script src="../Theme/Scripts/common.js" type="text/javascript"></script>
    <ext:XScript ID="XScript1" runat="server">
        <script language="javascript" type="text/javascript">
            var nodeClick = function (nodeID, nodeText) {
                if(nodeID!=null || nodeID=='undefined'){
			     var fields = nodeID.split('|');
			     if(fields.length==2){
				    var _id = fields[0];
				    var _url = fields[1]; 
				    var tabPanel= #{pnTabPanel};			
                         
				    addTab(tabPanel, _id, _url, nodeText);
			     } //end of fields.length
               }//end of nodeid !=null
			};//end of function
            /////Tạo tab mặc định (force: neu ton tai thi dong, con ko thi tao moi )////////////////////////////////////////
            function addDefaultTab(id, url, title) {
                var tabPanel= #{pnTabPanel};
                var tab = tabPanel.getComponent(id);
                if (tab) {
                    tabPanel.remove(tab);
                }
                addTab(tabPanel, id, url, title);
            };
        </script>
    </ext:XScript>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
        <Items>
            <%-- <ext:Panel ID="Panel1" runat="server" Title="" Region="North" Split="false" Height="80"
                BodyPadding="6" Collapsible="false" Header="false">
                <Content>
                    
                </Content>
            </ext:Panel>--%>
            <ext:Panel ID="Panel2" runat="server" Title="" Header="false" Region="North" Height="70"
                Border="false" Margins="5 5 0 5">
                <Content>
                    <div id="Banner">
                        <table width="100%" border="0">
                            <tr style="height: 70px;">
                                <td valign="middle" style="width: 800px;">
                                    <img src="../Theme/Images/bg_header.png" width="800" />
                                </td>
                                <td align="right" style="padding-bottom: 12px;" valign="bottom">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <%-- <ext:Panel ID="Panel3" runat="server" Title="" Header="false" Margins="0 5 0 5" Border="false">
                                                    <TopBar>
                                                        <ext:Toolbar ID="Toolbar1" Flat="true" runat="server">
                                                            <Items>
                                                            </Items>
                                                        </ext:Toolbar>
                                                    </TopBar>
                                                </ext:Panel>--%>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>
                </Content>
            </ext:Panel>
            <ext:Panel runat="server" ID="pnChucNang" Title="Menu chức năng" Region="West" Width="178"
                Collapsible="false" Margins="0 0 0 5" Layout="Accordion" Header="false">
                <Items>
                    <ext:TreePanel ID="TreePanel1" runat="server" Width="300" Height="450" Icon="FilmGo"
                        Collapsed="true" Collapsible="false" Title="Menu chức năng" AutoScroll="true"
                        RootVisible="false">
                        <Root>
                            <ext:Node Text="" Expanded="true">
                                <Children>
                                    <ext:Node Text="Quản lí Film" Expanded="true" Icon="ApplicationDouble">
                                        <Children>
                                            <ext:Node Text="Film" Icon="Film" Leaf="true" NodeID="Film_1|Film/Default.aspx">
                                            </ext:Node>
                                            <ext:Node NodeID="webaccount_1|User/Default.aspx" Text="Người dùng" Icon="Film" Leaf="true">
                                            </ext:Node>
                                            <ext:Node Text="Quốc gia" Icon="Film" Leaf="true" NodeID="country_1|Country/Default.aspx">
                                            </ext:Node>
                                            <ext:Node Text="Độ tuổi" Icon="Film" Leaf="true" NodeID="age_1|Age/Default.aspx">
                                            </ext:Node>
                                            <ext:Node Text="Nghề nghiệp" Icon="Film" Leaf="true" NodeID="occ_1|Occupation/Default.aspx">
                                            </ext:Node>
                                        </Children>
                                    </ext:Node>
                                    <ext:Node Text="Quản lý tài khoản" Expanded="true" Icon="ApplicationDouble">
                                        <Children>
                                            <ext:Node NodeID="account_1|UserAccount/Default.aspx" Text="Tài khoản" Icon="UserGray"
                                                Leaf="true">
                                            </ext:Node>
                                        </Children>
                                    </ext:Node>
                                </Children>
                            </ext:Node>
                        </Root>
                        <BottomBar>
                            <ext:StatusBar ID="StatusBar1" runat="server" AutoClear="1500" />
                        </BottomBar>
                        <Listeners>
                            <ItemClick Handler="nodeClick(record.data.id, record.data.text);#{StatusBar1}.setStatus({text: 'Chức năng được chọn: <b>' + record.data.text + '<br />', clear: false});" />
                            <ItemExpand Handler="#{StatusBar1}.setStatus({text: 'Chức năng được mở: <b>' + item.data.text + '<br />', clear: false});"
                                Buffer="30" />
                            <ItemCollapse Handler="#{StatusBar1}.setStatus({text: 'Node Collapsed: <b>' + item.data.text + '<br />', clear: false});"
                                Buffer="30" />
                        </Listeners>
                    </ext:TreePanel>
                </Items>
            </ext:Panel>
            <ext:Panel ID="pnCenter" runat="server" Title="" Header="false" Region="Center" Html=""
                Collapsible="false" Layout="FitLayout" Border="false">
                <TopBar>
                    <ext:Toolbar runat="server">
                        <Items>
                            <ext:ToolbarFill />
                            <ext:SplitButton ID="btnName" runat="server" Icon="User" MaxWidth="130" AutoDataBind="true"
                                Border="false" Text="Nguyễn Văn Tuấn">
                                <Menu>
                                    <ext:Menu ID="menu1" runat="server">
                                        <Items>
                                            <ext:MenuItem ID="menuLogin" Icon="GroupGo" Enabled="false" Text="Thoát">
                                                <DirectEvents>
                                                    <Click OnEvent="Login">
                                                        <EventMask ShowMask="true" />
                                                    </Click>
                                                </DirectEvents>
                                            </ext:MenuItem>
                                        </Items>
                                    </ext:Menu>
                                </Menu>
                            </ext:SplitButton>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:TabPanel runat="server" ID="pnTabPanel" DefaultPadding="0" EnableTabScroll="true"
                        Border="false">
                        <Items>
                            <ext:Panel ID="pnHomeDesk" runat="server" Title="Bàn làm việc" Border="false">
                                <Content>
                                    <table width="100%" class="tableHome">
                                        <tr style="height: 100%;">
                                            <td valign="top" width="50%">
                                                Bàn làm việc
                                            </td>
                                        </tr>
                                    </table>
                                </Content>
                            </ext:Panel>
                        </Items>
                        <Plugins>
                            <ext:TabCloseMenu ID="TabClose">
                            </ext:TabCloseMenu>
                        </Plugins>
                    </ext:TabPanel>
                </Items>
            </ext:Panel>
            <ext:Panel ID="Panel10" runat="server" Title="" Region="South" Split="true" Header="false"
                Collapsible="true" Height="30" BodyPadding="6" Html="South" />
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
